rdar://127199021, fix compatibility with apps that accidentally do [[[aSwiftArray class] new] mutableCopy] #73755
Merged
Catfish-Man merged 1 commit intoswiftlang:release/6.0from May 21, 2024
Conversation
…[aSwiftArray class] new] mutableCopy] to work (cherry picked from commit 0110340)
Contributor
Author
|
Sorry about automatically adding so many of y'all as reviewers, the base branch was wrong so there were a ton of commits in the PR briefly |
Contributor
Author
|
@swift-ci please test |
Contributor
Author
|
Linux failure is being addressed by #73463, it's unrelated to this change |
Member
|
This will actually be addressed by #73757... turns out CI was checking out the driver from the wrong branch in Swift 6.0 builds. |
Contributor
Author
|
@swift-ci Please test Linux platform |
Contributor
Author
|
@swift-ci Please test Windows platform |
stephentyrone
approved these changes
May 21, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation: At least one app is managing to call +new on our private NSArray subclass, which doesn't work. This change makes it return a regular NSArray to maintain compatibility
Original PR: #73728
Reviewed by: @parkera
Risk: Low. This method is never supposed to be called, and cannot be called from Swift code, so normal usage will never execute it. It also never worked in the past, so the set of potentially impacted applications is "ObjC apps that are doing very unusual things with certain objects that used to be ObjC but are now Swift under the hood"
Resolves: rdar://127199021
Tests: Adds a test